﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SDK.ApiService
{
    /// <summary>
    /// 快递查询
    /// </summary>
    public class TrackNodeParameter
    {

        /// <summary>
        /// 快递编号
        /// </summary>
        public string No { get; set; }

        /// <summary>
        /// 快递类型
        /// </summary>
        public string Type { get; private set; }

        /// <summary>
        /// 快递名称
        /// </summary>
        public string TypeName
        {
            set
            {
                switch (value)
                {
                    case string val when val.IndexOf("中通快运") > -1:
                        this.Type = "ZTO56";
                        break;

                    case string val when val.IndexOf("中通") > -1:
                        this.Type = "ZTO";
                        break;
                    case string val when val.IndexOf("申通") > -1:
                        this.Type = "STO";
                        break;
                    case string val when val.IndexOf("汇通") > -1:
                        this.Type = "HTKY";
                        break;
                    case string val when val.IndexOf("京东") > -1:
                        this.Type = "JD";
                        break;
                    case string val when val.IndexOf("顺丰") > -1:
                        this.Type = "SFEXPRESS";
                        break;
                    case string val when val.IndexOf("圆通") > -1:
                        this.Type = "YTO";
                        break;
                    case string val when val.IndexOf("天天") > -1:
                        this.Type = "TTKDEX";
                        break;
                    case string val when val.IndexOf("韵达") > -1:
                        this.Type = "YUNDA";
                        break;
                    case string val when val.IndexOf("EMS") > -1:
                        this.Type = "EMS";
                        break;
                    case string val when val.IndexOf("邮政") > -1:
                        this.Type = "CHINAPOST";
                        break;
                    case string val when val.IndexOf("百世快递") > -1:
                        this.Type = "HTKY";
                        break;
                    case string val when val.IndexOf("百世快运") > -1:
                        this.Type = "BSKY";
                        break;
                }
            }
        }

        /// <summary>
        /// 身份验证
        /// </summary>
        public string Authorization { get; set; }


    }
}
